home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form setPassword
- Caption = "IvanSoft CompLock -- Set Password"
- ClientHeight = 1935
- ClientLeft = 5280
- ClientTop = 4770
- ClientWidth = 4575
- Icon = "setPassword.frx":0000
- LinkTopic = "setPassword"
- MaxButton = 0 'False
- ScaleHeight = 1935
- ScaleWidth = 4575
- Begin VB.CommandButton cmdShrink
- Caption = "&Minimize to Systray"
- Height = 375
- Left = 1320
- TabIndex = 5
- Top = 840
- Width = 1935
- End
- Begin VB.CommandButton cmdQuit
- Caption = "E&xit"
- Height = 375
- Left = 3480
- TabIndex = 4
- Top = 840
- Width = 735
- End
- Begin VB.CheckBox chkSeePwd
- Caption = "&Show Me Password Before Locking Terminal"
- Height = 495
- Left = 360
- TabIndex = 3
- Top = 1320
- Width = 3975
- End
- Begin VB.CommandButton cmdOK
- Caption = "&OK"
- Default = -1 'True
- Enabled = 0 'False
- Height = 375
- Left = 360
- TabIndex = 2
- Top = 840
- Width = 735
- End
- Begin VB.TextBox txtPassB
- Height = 285
- IMEMode = 3 'DISABLE
- Left = 360
- PasswordChar = "*"
- TabIndex = 1
- Top = 480
- Width = 3855
- End
- Begin VB.TextBox txtPassA
- Height = 285
- IMEMode = 3 'DISABLE
- Left = 360
- PasswordChar = "*"
- TabIndex = 0
- Top = 120
- Width = 3855
- End
- Begin VB.Menu mnu_1
- Caption = "&Systray Menu"
- Visible = 0 'False
- Begin VB.Menu mPopRestore
- Caption = "&Restore"
- End
- Begin VB.Menu Sep1
- Caption = "-"
- End
- Begin VB.Menu mPopExit
- Caption = "E&xit"
- End
- End
- Attribute VB_Name = "setPassword"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Rem This Product made by IvanSoft
- ' 8888888888888
- ' 888888888888888888888888
- ' 8888 8888888888888888888888888
- ' 8888 8888888888888888888888888888
- ' 88 888 8888888888888888888888888
- ' 88888888 8 88888888888888888888
- ' 888 8 888888 88888888888 888
- ' 88 88888888 m 88888888888 8
- ' 888888888888888888 M 8888888888888
- ' 88888888888888888888 M88888888888888
- ' 8888888888888888888888 M8888888888888888
- ' 8888888888888888888888 M888888888888888888
- ' 8888888888888888 88888 M88888888888888888888
- ' 88888888888888888 88888 M888888888888888 8888
- ' 88888888888888888 88888 M ;o*M*o;888888888 88
- ' 88888888888888888 8888 M 88888888 8
- ' 88888888888888888 88 M ; 888888888
- ' 8888888888888888888 8 M aAa M8888888888 8
- ' 88 8888888888 88 8 M 888888888888888 8888
- ' 88 88888888888 8 M ; 88 88888888888888888
- ' 8 8888888888888 M "@@@@@@@" 8w8888888888888888
- ' 88888888888 888 M "@a@" M8i888888888888888
- ' 8888888888 88 M88 M88z88888888888888888
- '8888888888 8 M88888 MM888!888888888888888888
- '888888888 8 M8888888MAmmmAMVMM888*88888888 88888888
- '888888 M M888888888 MM88888888888888 8888888
- '8888 M M88888888888 MM888888888888888 88888
- ' 888 M M8888888888888M mM888888888888888 8888
- ' 888 M M8888 888888888888 m Mm88888 888888 8888
- ' 88 M 8888 88888888888888888 Mm8 88888 888
- ' 88 M 8888M 88888 888888888888 Mm88888 88
- ' 8 MM 8888M 8888 888888888888 Mm8 4
- ' 8M 8888M 888 88 8888888 Mm 2
- ' 88MM 8888M 88 8 888888 M M
- ' 8888M 888MM 8 M 8888 M M
- ' 88888M 88 M 8 M 8888 M M
- ' 88 888MM 888 M M 8888 M
- ' 8 88888M 88 M MM 88 M
- ' 88888M 88 M CENSOREDCENSORED M 88 M
- ' 888888M 88 M CENSOREDCENSORED M 88 M
- ' 888888MM 88 MM CENSOREDCENSORED M 8 CENSORED
- ' 88888 M 8 MM CENSOREDCENSORED M CENSORED
- ' 8888 MM MM MM CENSORED
- ' 888 M MM MM M CENSORED
- ' 888 MM MMM MM MM M
- ' 88 M MMMM MMMM MM MM
- ' 88 MM MMMMMMMMMMMMMMM MMM MMM
- ' 88 MM MMMMMMM MMMMMMMMMM
- ' 88 8MM MMMMMM
- ' 8 88MM M M MM
- ' 888MM MM MM MM
- ' 88888MM MMM mM MM
- ' 888888MM MMM MMM M
- ' 88888888MM MMM MM M
- ' 88 8888888M MMM M M
- ' 8 888888 M MM M M
- ' 888888 M M M MM
- ' 888888 M M M M
- ' 888888 M M @ M M
- ' 88888 M @@ M M
- ' 88888 M @@@ M M
- ' 88888 M @@ M M
- ' 88888 M m @ Mm M M
- ' 8888 M M MM M M
- ' 8888 M M MMM M M
- ' 888 M Mm MMM M M
- ' 8888 MM Mm MMMM m m M
- ' 888 M M MMM M mm M
- ' 8888 MM MM mM MM M
- ' M M mM MM Mm
- ' MM m M MM MM
- ' M M M M MM
- ' MM M M M M MM
- ' M CENSOREDCENSORED MM MMM
- ' M CENSOREDCENSORED MM MM
- ' M CENSOREDCENSORED M MM
- ' M CENSOREDCENSORED M MM
- ' M CENSOREDCENSORED M MM
- ' M CENSOREDCENSORED MMM
- ' M M MMM
- ' MM M MMM
- ' M M MMM
- ' MM M MMM
- ' M M MMM
- ' MM M MMM
- ' M M MMM
- ' MM M MMM
- ' M M MMM
- ' MM M MMM
- ' M M MMM
- ' MM M MMM
- ' MM M MMM
- ' MM M MMM
- ' MM M MMM
- ' MM M MMM
- ' MM M MMM
- ' MM M MMM
- ' MMM MMM
- ' MM MMM
- ' M MMM
- ' MM MMM
- ' MM MMM
- ' MM M MMM
- ' mMM MM MMMM
- ' MMM MMM M
- ' mMM M M M M
- ' MM MMMM M M
- ' MM MMM M M
- ' mMM MM M M
- ' MM MM M M
- ' MM MM M m
- ' MM M MM
- ' MMM M
- ' MMM M
- ' MMM M
- ' MMM M
- ' MMM Mm
- ' MM MM
- ' MMM MM
- ' MMM MM
- ' MMM MM
- ' MMM MM
- ' MM MMM
- ' MMM MM
- ' MMM MM
- ' MMM MM
- ' MM MM
- ' MM MM
- ' MM MM
- ' MMM MM
- ' MMM MM
- ' MM MM
- ' MMM MM
- ' MMM MM
- ' MM MM
- ' MMM MM
- ' MMM MM
- ' MM MM
- ' MM MM
- ' MM MM
- ' MM MM
- ' MM M M
- ' MM M M
- ' M M
- ' M M M
- ' M M M
- ' M M M
- ' M M M
- ' M MM M
- ' M M M
- ' M; ; M M
- ' M m ; M M
- ' MM m m M ; M
- ' MM m MM ; ;M
- ' MM MMM ; m M
- ' MMMM MM m m MM
- ' MM m MM
- ' MM MM
- ' MM MM
- ' M M
- Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
- Private Type NOTIFYICONDATA
- cbSize As Long
- hwnd As Long
- uId As Long
- uFlags As Long
- uCallBackMessage As Long
- hIcon As Long
- szTip As String * 64
- End Type 'constants required by Shell_NotifyIcon API call:
- Const NIM_ADD = &H0
- Const NIM_MODIFY = &H1
- Const NIM_DELETE = &H2
- Const NIF_MESSAGE = &H1
- Const NIF_ICON = &H2
- Const NIF_TIP = &H4
- Const WM_MOUSEMOVE = &H200
- Const WM_LBUTTONDOWN = &H201 'Button down
- Const WM_LBUTTONUP = &H202 'Button up
- Const WM_LBUTTONDBLCLK = &H203 'Double-click
- Const WM_RBUTTONDOWN = &H204 'Button down
- Const WM_RBUTTONUP = &H205 'Button up
- Const WM_RBUTTONDBLCLK = &H206 'Double-click
- Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
- Private nid As NOTIFYICONDATA
- Private Sub cmdOK_Click()
- myPass = txtPassA.Text
- If chkSeePwd.Value = 1 Then
- MsgBox "Your Password is: " & myPass & "", vbInformation + vbMsgBoxSetForeground, "Your Password"
- Me.Hide
- frmLock.Show
- Me.Hide
- frmLock.Show
- End If
- End Sub
- Private Sub cmdQuit_Click()
- MsgBox "Thank You for using IvanSoft CompLock, Version " & App.Major & "." & App.Minor & "." & App.Revision & ""
- End Sub
- Private Sub cmdShrink_Click()
- Me.WindowState = vbMinimized
- End Sub
- Private Sub Form_Load()
- Me.Show
- Me.Refresh
- With nid
- .cbSize = Len(nid)
- .hwnd = Me.hwnd
- .uId = vbNull
- .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
- .uCallBackMessage = WM_MOUSEMOVE
- .hIcon = Me.Icon
- .szTip = " Click Right Mouse Button " & vbNullChar
- End With
- 'If you want an icon always in the systray, do this: Shell_NotifyIcon NIM_ADD, nid
- End Sub
- Private Sub txtPassA_Change()
- If txtPassA.Text = txtPassB.Text Then
- cmdOK.Enabled = True
- cmdOK.Enabled = False
- End If
- End Sub
- Private Sub txtPassB_Change()
- If txtPassB.Text = txtPassA.Text Then
- cmdOK.Enabled = True
- cmdOK.Enabled = False
- End If
- End Sub
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- 'This procedure receives the callbacks from the System Tray icon.
- '
- Dim Result As Long
- Dim msg As Long 'The value of X will vary depending upon the scalemode setting
- If Me.ScaleMode = vbPixels Then
- msg = X
- Else
- msg = X / Screen.TwipsPerPixelX
- End If
- Select Case msg
- 'Case WM_LBUTTONUP '514 restore form window Me.WindowState = vbNormal Result = SetForegroundWindow(Me.hwnd) Me.Show
- Case WM_LBUTTONDBLCLK '515 restore form window
- Me.WindowState = vbNormal
- Result = SetForegroundWindow(Me.hwnd)
- Me.Show
- Case WM_RBUTTONUP
- 'Case WM_RBUTTONUP '517 display popup menu Result = SetForegroundWindow(Me.hwnd) '***** STOP! and make sure that your first menu item
- ' is named "mnu_1", otherwise you will get an erro below!!! *****
- ' **
- Me.PopupMenu Me.mnu_1
- End Select
- End Sub
- Private Sub Form_Resize()
- 'this is necessary to assure that the minimized window is hidden
- If Me.WindowState = vbMinimized Then
- Shell_NotifyIcon NIM_ADD, nid
- Me.Hide
- Else
- Me.Width = 4695
- Me.Height = 2340
- End If
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- 'this removes the icon from the system tray
- Shell_NotifyIcon NIM_DELETE, nid
- MsgBox "Thank You for using IvanSoft CompLock, version " & App.Major & "." & App.Minor & "." & App.Revision & ""
- End Sub
- Private Sub mPopExit_Click()
- 'called when user clicks the popup menu Exit command
- Unload Me
- End Sub
- Private Sub mPopRestore_Click()
- 'called when the user clicks the popup menu Restore command
- Me.WindowState = vbNormal
- Result = SetForegroundWindow(Me.hwnd)
- Me.Show
- End Sub
-